import { request } from "@/utils/service"
import type * as Evaluate from "./types/evaluate"

/** 增 */
export function createEvaluateDataApi(data: Evaluate.CreateOrUpdateEvaluateRequestData) {
  return request({
    url: "evaluate",
    method: "post",
    data
  })
}

/** 删 */
export function deleteEvaluateDataApi(ids: string) {
  return request({
    url: `evaluate/batch?ids=${ids}`,
    method: "delete"
  })
}

// /** 改 */
export function updateEvaluateDataApi(data: Evaluate.CreateOrUpdateEvaluateRequestData) {
  return request({
    url: "evaluate",
    method: "put",
    data
  })
}

/** 查 */
export function getEvaluateDataApi(params: Evaluate.GetEvaluateRequestData) {
  return request<Evaluate.GetEvaluateResponseData>({
    url: "evaluate",
    method: "get",
    params
  })
}
